package com.fit.pages;

import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.SessionState;

import com.fit.interfaces.Jewelry;
import com.fit.interfaces.User;


public class JewelryDetails {
	
	@Persist("flash")
	private Jewelry chosenJewelry;

	public Jewelry getChosenJewelry() {
		return chosenJewelry;
	}

	public void setChosenJewelry(Jewelry chosenJewelry) {
		this.chosenJewelry = chosenJewelry;
	}
	
	@SessionState
	private User user;

	private boolean userExists;
	
	public User getUser() {
		return user;
	}
	
	Object onActivate() {
		if (!userExists) return Login.class;
		return null;
	}
	
	

}
